package com.cwnu.service.impl;

import com.cwnu.entity.Remark;
import com.cwnu.mapper.RemarkMapper;
import com.cwnu.service.RemarkService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RemarkServiceImpl implements RemarkService {
    @Autowired
    private RemarkMapper remarkMapper;
    @Override
    public Integer getUserId(Integer articleId) {
        return remarkMapper.getUserId(articleId);
    }

    @Override
    public boolean add(Remark remark) {
        return remarkMapper.add(remark) == 1;
    }

    @Override
    public List<Remark> getRemarkList(Integer userId) {
        return remarkMapper.getRemarkList(userId);
    }
}
